<html>
<head>
	<title> Payment </title>
</head>
<body>
	<form action="/pay" method="post" id="adyen-encrypted-form">
		<p> Price: <strong>EUR 12.34</strong>. </p>
		<p>
			Card:         <input type="text" name="card[number]"       id="adyen-encrypted-form-number" 
								autocomplete="off" data-encrypted-name="number" /><br />
			Holder name:  <input type="text" name="card[holder_name]"  id="adyen-encrypted-form-holder-name" 
								autocomplete="off" data-encrypted-name="holderName" /><br />
			Expiry month: <input type="text" name="card[expiry_month]" id="adyen-encrypted-form-expiry-month" 
								size="2" autocomplete="off" data-encrypted-name="expiryMonth" /><br />
			Expiry year:  <input type="text" name="card[expiry_year]"  id="adyen-encrypted-form-expiry-year" 
								size="4" autocomplete="off" data-encrypted-name="expiryYear" /><br />
			CVC:          <input type="text" name="card[cvc]"          id="adyen-encrypted-form-cvc"
								size="4" autocomplete="off" data-encrypted-name="cvc" /><br />
		</p>
		<p>
			<input type="hidden" id="adyen-encrypted-form-expiry-generationtime" 
				value="<%= Time.now.utc.strftime('%FT%T.%3NZ') %>" data-encrypted-name="generationtime" />

			<input type="submit" name="submit" value="Pay" />
		</p>
	</form>

	<script type="text/javascript" src="/adyen.encrypt.js?0_1_7"></script>
	<script type="text/javascript">
		var key = "<%= Adyen.configuration.cse_public_key %>";
		var options = {};

		adyen.encrypt.createEncryptedForm(document.getElementById('adyen-encrypted-form'), key, options);
	</script>
</body>
</html>
